<%layout("/common/_layout.html"){%>
<%#ajax userTable:{%>
  <div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">首页</strong> / <small>UI控件DEMO</small></div>
  </div>
  <div class="am-g">
    <div class="am-u-sm-12">
      <table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
        <tbody>
          <tr>
            <th class="am-text-middle">所属企业</th>
            <td>
               <div class="am-u-sm-10">
                  <select data-am-selected="{btnSize: 'sm'}">
                    <option value="option1">大掌柜</option>
                  </select>
              </div>
            </td>
            <th class="am-text-middle">店铺状态</th>
            <td>
              <div class="am-u-sm-10">
                <select data-am-selected="{btnSize: 'sm'}">
                  <option value="option1">所有</option>
                  <option value="option1">打开</option>
                  <option value="option1">关闭</option>
                </select>
              </div>
            </td>
          </tr>
          <tr>
            <th class="am-text-middle">店员姓名</th>
            <td>
              <div class="am-u-sm-10">
                <input type="text" class="am-form-field am-input-sm">
              </div>
            </td>
            <th class="am-text-middle">注册时间</th>
            <td>
              <div class="am-u-sm-10">
                <div class="am-form am-form-inline">
                  <div class="am-form-group am-form-icon">
                    <i class="am-icon-calendar"></i>
                    <input type="text" class="am-form-field am-input-sm" placeholder="开始时间" data-am-datepicker readonly>
                  </div>
                  <div class="am-form-group">至</div>
                  <div class="am-form-group am-form-icon">
                    <i class="am-icon-calendar"></i>
                    <input type="text" class="am-form-field am-input-sm" placeholder="结束时间" data-am-datepicker readonly>
                  </div>
                </div>
              </div>
            </td>
          </tr>
          <tr>
            <th class="am-text-middle">店员手机号</th>
            <td>
              <div class="am-u-sm-10">
                <input type="text" class="am-form-field am-input-sm">
              </div>
            </td>
            <th class="am-text-middle">店铺名称</th>
            <td>
              <div class="am-u-sm-10">
                <input type="text" class="am-form-field am-input-sm">
              </div>
            </td>
          </tr>
          <tr>
              <td colspan="4">
                <div align='right'>
                  <button type="button" class="am-btn am-btn-default am-btn-sm am-text-secondary">搜索</button>
                </div>
              </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="am-u-sm-12 am-u-md-12">
      <div class="am-btn-toolbar">
        <div class="am-btn-group am-btn-group-xs">
          <a class="am-btn am-btn-default" href="${base!}/template/add"><span class="am-icon-plus"></span> 新增</a>
          <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
          <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 审核</button>
          <button type="button" id="deleteButton" disabled="disabled" class="am-btn am-btn-default"  onclick="deleteAll('${base!}/template/delete')"><span class="am-icon-trash-o"></span> 删除</button>
        </div>
      </div>
    </div>
  </div>

  <div class="am-g">
    <div class="am-u-sm-12">
      <form class="am-form">
        <table class="am-table am-table-striped am-table-hover table-main">
             <thead>
                 <tr>
                     <th class="table-check"><input type="checkbox"  id="allCheck"/></th><th class="table-title">模块名称</th><th class="table-title ">图片路径</th><th class="table-title ">链接路径</th><th class="table-title">排序</th><th class="table-title">是否启用</th><th class="table-set">操作</th>
                 </tr>
             </thead>
          <tbody>
             <%for(list in pager.list!){%>
                <tr>
                 <td><input type="checkbox" name="ids" value="${list.id}"></td>
                 <td ><a href="${base!}/template/add">${list.name}</a></td>
                 <td >${list.img_url}</td>
                 <td >${list.link_url}</td>
                 <td >${list.sort}</td>
                  <td >
                    <%if (list.enabled==1){%>
                                                                      是
                    <%}else{%>
                                                                      否
                    <%}%>
                  </td>
                  <td >
                   <div class="am-btn-toolbar">
                     <div class="am-btn-group am-btn-group-xs">                    
                       <button type="button" class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="location.href='${base!}/template/add'"><span class="am-icon-pencil-square-o"></span>编辑</button>
                     </div>
                   </div>

                  </td>         
               </tr>
             <%}%> 
          </tbody>
       </table>
     	 <div class="am-cf">
 			<!-- 分页 -->
 			<%if (pager.list.~size > 0){%>
 				<div class="am-fr">
 					<% include("/admin/pager.tpl"){}%>
 				</div>
 			<%}else{%>
  			<div class="am-kai">
			  <h3>没有找到任何记录!</h3>
			</div>
 			<%}%>
	 </div>
      </form>
    </div>

  </div>
  <%}%>
<%}%>